//////


        //Prisijungimas

echo "<table cellpadding='0' cellspacing='0' width='795' >
<tr>

<td>";

if (iMEMBER) {

	$msg_count = dbcount("(message_id)", "messages", "message_to='".$userdata['user_id']."' AND message_read='0'AND message_folder='0'");

echo "<table width='795' height='29' border='0' cellspacing='0' cellpadding='0' align='center'  style='padding-right:2px;'> <tr>";

	echo "<td align='right' class='login'>";





echo "<a href='".BASEDIR."profile.php?lookup=".$userdata['user_id']."'>Mano profilis</a>  ";

echo "<a href='".BASEDIR."messages.php'>Asmenins inuts</a> (<b><span style='color:#ffffff'>".sprintf($msg_count)."</span></b>)  ";

echo "<a href='".BASEDIR."members.php'>Nari sraas</a>  ";

echo "<a href='".BASEDIR."edit_profile.php'>Redaguoti profil</a>  ";

	



if (iADMIN && (iUSER_RIGHTS != "" || iUSER_RIGHTS != "C")) {

	echo "<a href='".ADMIN."index.php".$aidlink."'>Administracija</a>  \n";

	}

	echo "<a href='".BASEDIR."setuser.php?logout=yes' >Atsijungti</a>";

echo"</td>";



echo"</tr></table>";

} else {

echo "<table width='550' height='29' border='0' cellspacing='0' cellpadding='0' align='right'  style='padding-left:2px;'>
<tr>

<td>";


echo "<form name='loginform' method='post' action='".FUSION_SELF."'>

    



<td align='left' style='font-size:9px;'><a href='".BASEDIR."register.php'>Registruotis</a> / <a href='".BASEDIR."lostpassword.php'>Prisiminti</a> </td>



<td align='right' style='color:#989898;' class='login' >Vardas: </td>
    <td>&nbsp;<input type='text' name='user_name' class='inputas' style='width:100px;'></td> 
 
  
    <td align='right' style='color:#989898;' class='login'  >Slaptaodis: </td>
    <td>&nbsp;<input type='password' name='user_pass' class='inputas' style='width:100px;'></td> 
 

     <td style='padding-left:2px;'>&nbsp;<input type='submit' name='login' value='' class='button-ok'></td>





</form>";

echo"</tr></table>";


}


//////